import request from '@/utils/request'

// 能耗终端管理

// 列表 错误码300010
export function list(params) {
    return request({
        url: '/device/networks/list',
        method: 'get',
        params
    })
}

// 详情 错误码300011
export function detail(id) {
    return request({
        url: `/device/networks/${id}`,
        method: 'get',
    })
}
// 新增 错误码300012
export function add(data) {
    return request({
        url: '/device/networks',
        method: 'post',
        data
    })
}
// 编辑 错误码300013
export function edit(data) {
    return request({
        url: '/device/networks',
        method: 'put',
        data
    })
}

// 删除 错误码300014
export function del(id) {
    return request({
        url: `/device/networks/${id}`,
        method: 'delete',
    })
}

// 列表 错误码300015
export function maxCode(params) {
    return request({
        url: '/device/networks/maxCode',
        method: 'get',
        params
    })
}
